/*! \file   entity.h
	\author HiddenSeeker

	Declares an entity group <identifier_list>:<type>
*/
#include "list.h"
#include "classtype.h"
#include "identifierstring.h"
#pragma once
/*! Class that declares entity group
*/
class EntityGroup: public AbstractNode
{
 private:
		 ListNode<IdentifierNode> *  m_identifier_list;
		 ClassTypeNode  *          m_type_name;
 public:
	     inline ListNode<IdentifierNode> * idList()    { return m_identifier_list; }
		 inline ClassTypeNode *            className() { return m_type_name; }
		 
		 inline EntityGroup(ListNode<IdentifierNode> * lst, ClassTypeNode * type):
		        AbstractNode(make_pos(lst->line(),lst->position()))
		 {
			 m_identifier_list=lst;
			 m_type_name=type;
		 }
		 /*! Writes a node data to stream
		 */
		 void write(GraphStream * s);
		 inline ~EntityGroup()
		 {
			 if (isOwningData())
			 {
				 delete m_identifier_list;
				 delete m_type_name;
			 }
		 }
};

typedef ListNode<EntityGroup> EntityList;

